home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / board / GNUChess4_0_58.lha / gnuchess-4.0 / src / README < prev   
Text File  |  1992-08-26  |  2KB  |  36 lines

  1.  There is a problem with the gcc 2.00 pre processor and FIONREAD
  2.  will not compile properly on gcc 2.00. If you get an error
  3.  message you may need to substitute a value for FIONREAD in
  4.  ElapsedTime. The correct line for a SunsparcOS4 is included
  5.  as a comment. cpp on 2.00 does not substitute in quotes,
  6.  sunOS cc and gcc 1.40 handle this correctly.
  7. --- 1,28 ----
  8.  If you are using gcc (or another ANSI-compatible C compiler) to compile
  9.  gnuchess, but the standard C compiler provided on your operating system is not
  10.  ANSI-compatible, you may have problems compiling the FIONREAD ioctl in
  11.  dspcom.c.  The problem occurs because older versions of the <ioctl.h> header
  12.  file took advantage of a C preprocessor feature that no longer works the same
  13.  way in ANSI C.  If you have this problem, gnuchess will exit with an error
  14.  message referring to FIONREAD whenever you try to run it.
  15.  
  16.  This problem is known to occur on SunOS.
  17.  
  18.  If you have gcc 2.00 or later, you can work around the problem by including
  19.  the "-traditional-cpp" flag on the CFLAGS line in the gnuchess makefile.  Be
  20.  sure to remove the .o files after you make this change so they get recompiled.
  21.  
  22.  If you don't have gcc 2.00, various other workarounds may be possible; for
  23.  instance, you could compile a program that uses FIONREAD with the standard C
  24.  compiler for your operating system, find out what value FIONREAD reduces to,
  25.  and put this value directly into dspcom.c as a #define.  For instance, the
  26.  following program will print out the correct #define:
  27.  
  28.  #include <sys/ioctl.h>
  29.  #ifdef __STDC__
  30.  ERROR Compile me with a non-ANSI compiler!
  31.  #endif
  32.  main()
  33.  {
  34.    printf("#define FIONREAD 0x%x\n", FIONREAD);
  35.  }
  36.